<h1>ScrCommands</h1>

<div class="abstract">
  Service Component Runtime (SCR) console commands to view dynamic and
  static state of components and enable or disable them.
</div>


<h2>Description</h2>
The scrcommands bundle publishes one command group called <tt>scr</tt>.

<p>
This command group currently works with SCR that provides the
<tt>org.apache.felix.scr.ScrService</tt> service.
</p>

<h2>Scr - Scr Commands</h2>

<p>
  The group contains the following commands:
</p>

<ul><li>
      <tt>disable [-help] &lt;component&gt ...</tt></li>
    <li>
      <tt>enable [-help] &lt;component&gt ...</tt></li>
    <li>
      <tt>list [-help] [-i] [-l] [-n] [-r] [&lt;bundle&gt] ...</tt></li>
    <li>
      <tt>show [-help] [-b] [-f] [-n] [-r] [&lt;component&gt] ...</tt></li>
</ul>

<h3>disable</h3>

<p>
  The <tt>disable</tt> command is used to disable selected component(s).
</p>

<pre>
  disable [-help] &lt;component&gt ...
</pre>

<p>Parameters:</p>
<dl><dt><b>-help</b></dt><dd>Display command help text.</dd>
  <dt><b>&lt;component&gt;</b></dt><dd>Name or id of component.</dd>
</dl>

<h3>enable</h3>

<p>
  The <tt>enable</tt> command is used to enable selected component(s).
</p>

<pre>
  enable [-help] &lt;component&gt ...
</pre>

<p>Parameters:</p>
<dl><dt><b>-help</b></dt><dd>Display command help text.</dd>
  <dt><b>&lt;component&gt;</b></dt><dd>Name or id of component.</dd>
</dl>

<h3>list</h3>

<p>
  The <tt>list</tt> command is used to list information about
  components for selected bundles. Components are shown in bundle id
  order if no order parameter is given.
</p>

<pre>
  list [-help] [-i] [-l] [-n] [-r] [&lt;bundle&gt] ...
</pre>

<p>Parameters:</p>
<dl><dt><b>-help</b></dt><dd>Display command help text.</dd>
  <dt><b>-i</b></dt><dd>List components in ID order.</dd>
  <dt><b>-l</b></dt><dd>Show long version of information,
    that includes information about properties, services
    provided and referenced.</dd>
  <dt><b>-n</b></dt><dd>List components in name order",
  <dt><b>-r</b></dt><dd>List components in reverse order",
  <dt><b>&lt;bundle&gt;</b></dt><dd>Name or id of bundle. If
    no value is given or a <tt>"*"</tt>, list entries from
    all bundles.</dd>
</dl>

<h3>show</h3>

<p>
  The <tt>show</tt> command is used to show information about
  components. Components are shown in component id  order if
  no order parameter is given. With the <tt>-f</tt> parameter
  will show more information than the <tt>list</tt> command,
  it will show some, static information about the component.
</p>

<pre>
  show [-help] [-b] [-f] [-n] [-r] [&lt;component&gt] ...
</pre>

<p>Parameters:</p>
<dl><dt><b>-help</b></dt><dd>Display command help text.</dd>
  <dt><b>-b</b></dt><dd>List components in bundle ID order.</dd>
  <dt><b>-f</b></dt><dd>Show full version of information,
    that includes static information about the component.</dd>
  <dt><b>-n</b></dt><dd>List components in name order",
  <dt><b>-r</b></dt><dd>List components in reverse order",
  <dt><b>&lt;component&gt;</b></dt><dd>Name or id of component.
    If no value is given, show all components registered.</dd>
</dl>

<h3>Examples</h3>
<p>
List all components for all bundles.
</p>
<pre>
scr&gt; list
ID State        BID Name
 0 ACTIVE        19 scrCommandGroup
 1 REGISTERED    25 componentE_test.E1
 2 FACTORY       25 componentE_test.E2
</pre>

<p>
Show full inforamtion about scrCommandGroup component.
</p>
<pre>
scr&gt; show -f scrCommandGroup
ID State        BID Name
 0 ACTIVE        19 scrCommandGroup
   &gt; Service: org.knopflerfish.service.console.CommandGroup
   &gt; Satisfied reference:   org.apache.felix.scr.ScrService [1..1], static bind
   &gt; Property groupName = scr
   &gt; Delayed component, default enabled, config policy = optional
</pre>

<h2>See Also</h2>
<a href="../console/index.html">Console</a>
